<div class="panel panel-info">
	<div class="panel-heading">筛选</div>
	<div class="panel-body">
		<form action="./index.php" method="get" class="form-horizontal" role="form">
			<input type="hidden" name="c" value="site" />
			<input type="hidden" name="a" value="entry" />
			<input type="hidden" name="id" value="{$_GPC['id']}" />
			<input type="hidden" name="op" value="log" />
			<input type="hidden" name="do" value="manage" />
			<input type="hidden" name="m" value="{php echo MODULE_NAME}" />
			<div class="form-group">
				<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">推荐人信息</label>
				<div class="col-xs-12 col-sm-8 col-lg-9">
					<input class="form-control" name="keyword" id="" type="text" value="{$_GPC['keyword']}" placeholder="可搜索推荐人昵称/姓名/手机号">
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">扫码人信息</label>
				<div class="col-xs-12 col-sm-8 col-lg-9">
					<input class="form-control" name="keyword1" id="" type="text" value="{$_GPC['keyword1']}" placeholder="可搜索扫码人昵称/姓名/手机号">
				</div>
			</div>

			<div class="form-group">
				<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">关注时间</label>
				<div class="col-sm-2">
					<label class='radio-inline'>
                    	<input type='radio' value='0' name='searchtime' {if $_GPC['searchtime']=='0'}checked{/if}>不搜索
                    </label>
					<label class='radio-inline'>
                    	<input type='radio' value='1' name='searchtime' {if $_GPC['searchtime']=='1'}checked{/if}>搜索
                    </label>
				</div>
				<div class="col-sm-7 col-lg-9 col-xs-12" style='padding:0'>
					{php echo tpl_form_field_daterange('time', array('starttime'=>date('Y-m-d H:i', $starttime),'endtime'=>date('Y-m-d H:i', $endtime)),true);}
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label"> </label>
				<div class="col-xs-12 col-sm-8 col-lg-9">
					<button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
				</div>
			</div>
		</form>
	</div>
</div>

<form action="" method="post">
	<div class='panel panel-default'>
		<div class='panel-heading'>
			关注记录 (人数: {$total})
		</div>
		<div class='panel-body'>

			<table class="table">
				<thead>
					<tr>
						<th>推荐人信息</th>
						<th>推荐人奖励</th>
						<th>关注者信息</th>
						<th>关注时间</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					{loop $list $row}
					<tr>
						<td><img src="{$row['avatar']}" onerror="this.src='../addons/{php echo MODULE_NAME}/static/img/head.jpg'" style='width:30px;height:30px;padding1px;border:1px solid #ccc' /> {if empty($row['nickname'])}未获取{else}{$row['nickname']}{/if} ({$row['realname']}/{$row['mobile']})
							<br/> <label class='label label-danger'>推荐关注人数: {$row['times']}</label>
						</td>
						<td>
							{if !empty($row['reccredit'])}+积分: {$row['reccredit']}<br/>{/if} 
							{if $row['recmoney']>0}+余额: {$row['recmoney']}<br/>{/if}
							{if empty($row['reccredit']) && $row['recmoney'] <= 0}
								无奖励
							{/if}
						</td>
						<td><img src="{$row['avatar1']}" onerror="this.src='../addons/{php echo MODULE_NAME}/static/img/head.jpg'" style='width:30px;height:30px;padding1px;border:1px solid #ccc' /> {if empty($row['nickname1'])}未获取{else}{$row['nickname1']}{/if} ({$row['realname1']}/{$row['mobile1']})
						</td>
						<td>{php echo date('Y-m-d H:i',$row['createtime'])}</td>
						<td>
							<a class='btn btn-default' href="{php echo $this->createWebUrl('manage', array('op' => 'logdelete', 'id' => $row['id'], 'postid' => $_GPC['id']))}" title='删除' onclick="return confirm('删除不可恢复，确认删除？');return false;"><i class='fa fa-remove'></i></a>
						</td>
					</tr>
					{/loop}
				</tbody>
			</table>
			{$pager}
		</div>
	</div>
	<input type="button" name="back" onclick="history.back()" style="margin-left:10px;" value="返回列表" class="btn btn-default col-lg-1">
</form>